﻿@model IEnumerable<Products.Product>
@{
    ViewBag.Title = "Products list";
    Layout = "~/Views/Shared/App.cshtml";
}
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <thead>
        <tr>
            <th>
            </th>
            <th>
                Name
            </th>
            <th>
                Memo
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { id = item.Id }) |
                    @Html.ActionLink("Database infos", "Index", "Table", new { area = "DataBase", product = item.Name, version = item.Versions[0].Name }, null)
                    |
                    @Html.ActionLink("Delete", "Delete", new { id = item.Id })
                </td>
                <td>
                    @item.Name
                </td>
                <td>
                    @item.Memo
                </td>
            </tr>
        }
    </tbody>
</table>
